import { request } from "@/request";
import mockApi from './mock'
// 是否使用mock数据
export default {
  getMockData: () =>
    request({
      method: 'get',
      url: '/platform/config/detail/2',
    }),
  cabinet: (data) =>
    request({
      data,
      url: '/index/statistics/cabinet'
    }),
  alarm: (data) =>
    request({
      data,
      url: '/index/statistics/alarm'
    }),
  pue: (data) =>
    request({
      data,
      url: '/index/statistics/energy/pue'
    }),
  alarmList: (data) =>
    request({
      data,
      url: '/dicm/alarm/page'
    }),
  workOrderList: (data) =>
    request({
      data,
      method: 'get',
      url: '/index/statistics/query/WorkOrder/list'
    }),
  workOrderStics: (data) =>
    request({
      data,
      url: '/index/statistics/work/order'
    }),
  pueTop5: (data) =>
    request({
      data,
      url: '/index/statistics/top/pue'
    }),
  getTree: (data) =>
    request({
      data,
      url: '/dicm/data/address/tree'
    }),
  space: (data) =>
    request({
      data,
      method: 'get',
      url: '/dicm/data/cabinet/space'
    }),
  statisticsType: (data) =>
    request({
      data,
      url: '/work/order/alarm/statistics/type'
    }),
  alarmTrend: (params) =>
    request({
      params,
      url: '/work/order/alarm/page',
    }),
  getDevList: (data) =>
    request({
      data,
      url: '/posture/device/list'
    }),
  getAvailable: (data) =>
    request({
      data,
      method: 'get',
      url: '/topology/layer/compose/available'
    }),
  get1_6_num: () =>
    request({
      method: 'get',
      url: '/platform/config/detail/2'
    }),
  getPxList: () =>
    request({
      method: 'get',
      url: '/query/equipmentManage/list?pageSize=9999'
    }),
  getInfoByDevUeid: (data) =>
    request({
      data,
      method: 'get',
      url: '/dicm/data/query/byCabinetId'
    }),
  getNewTree: (data) =>
    request({
      method: 'get',
      url: `/dicm/data/query/deviceByRoomId`,
      data
    })
}